Graphics lab with Plotly.
library(ggplot2)
library(plotly)
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
use_cpu <- rnorm(100, mean = 75, sd = 7)
use_ram <- rnorm(100, mean = 55, sd = 3)
x <- c(1:300)
data <- data.frame(x, use_cpu, use_ram)
fig <- plot_ly(data, x = ~x, y = ~use_cpu, name = 'Use CPU', type = 'scatter', mode = 'lines')
fig <- fig %>% add_trace(y = ~use_ram, name = 'Use RAM', mode = 'lines+markers')
fig <- fig %>% layout(title ='Computing Consumption', xaxis = list(title = 'Day of Year'), yaxis = list(title = 'Computing Resources (%)'))
fig